<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <title>背景收缩动画按钮</title>
    <style>
        .app {
            width: 100%;
            height: 100vh;
            background-color: #ffffff;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .btn56 {
            width: 120px;
            height: 46px;
            font-size: 16px;
            font-weight: 400;
            letter-spacing: 2px;
            background: transparent;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            border: 1px solid #457356;
            border-radius: 23px;
            color: #457356;
            box-sizing: border-box;
            transition: color 0.6s cubic-bezier(0.65, 0.05, 0.36, 1);
            overflow: hidden;
        }

        .btn56:before {
            content: '';
            position: absolute;
            width: 120px;
            height: 120px;
            border-radius: 50%;
            display: block;
            transition: box-shadow 0.6s cubic-bezier(0.65, 0.05, 0.36, 1);
        }

        .btn56:after {
            content: attr(data-text);
            position: absolute;
            display: block;
            z-index: 5;
        }

        .btn56:hover {
            color: #fff;
        }

        .btn56:hover:before {
            box-shadow: inset 0 0 0 120px #457356;
        }

        .btn56:active {
            transform: scale(0.99) translateY(1px);
        }
    </style>
</head>

<body>
    <div class="app">
        <div class="btn56" data-text="一个按钮"></div>
    </div>
</body>

</html>